package com.linciping.rtmputiltest;

import com.linciping.rtmputil.RtmpUtil;
import com.linciping.rtmputil.StatusEnum;

public class Main {

    public static void main(String[] args) {
        if (args.length < 3) {
            System.out.println("args error.\n");
            return;
        }
        String rtmpUrl = args[0];
        String outputDirPath = args[1];
        String videoName = args[2];
        StatusEnum statusEnum = RtmpUtil.outputVideoAndPicture(rtmpUrl, outputDirPath, videoName, 30, 5, 0, 0);
        if (statusEnum == StatusEnum.SUCCESS) {
            System.out.println("操作成功");
        } else {
            System.out.println("操作失败");
        }
    }
}
